import React, { Suspense } from 'react'
import { BrowserRouter as Router, Switch } from 'react-router-dom'
import { RecoilRoot } from 'recoil'
import RouterConfig from './routes/RouterConfig'
import LoadingComponent from './utils/lazyload'
import './index.scss'
function App() {
  return (
    <RecoilRoot>
      <Router>
        <Suspense fallback={<LoadingComponent />}>
          <Switch>
            <RouterConfig />
          </Switch>
        </Suspense>
      </Router>
    </RecoilRoot>
  )
}

export default App
